function logMapElements(value, key, set) {
    print(`m[${key}] = ${value}`);
}

new Set(['foo', 'bar', undefined]).forEach(logMapElements);

function logMapElements1(value, key, set) {
    print(`m[${key}] = ${value}`);
    set.delete(key);
    print(set.size);
}

new Set(['foo', 'bar', undefined]).forEach(logMapElements1);
